import request from '@/utils/request'

//增加集中式房源
export function saveFocus(qurey) {
  return request({
    url: 'house/house/saveFocus',
    method: 'post',
    data: qurey
  })
}

//增加分散式房源
export function saveDisperse(qurey) {
  return request({
    url: 'house/house/saveDisperse',
    method: 'post',
    data: qurey
  })
}

//获取所有管家
export function getSteward() {
  return request({
    url: 'house/room/getSteward',
    method: 'get'
  })
}

//获取私有配套
export function getPrivateFacility() {
  return request({
    url: 'house/room/getPrivateFacility',
    method: 'get'
  })
}

//获取公有配套
export function getPublicFacility() {
  return request({
    url: 'house/room/getPublicFacility',
    method: 'get'
  })
}

//推荐房源
export function recommend(id) {
  return request({
    url: 'house/room/recommend/'+id+"/"+1,
    method: 'post'
  })
}

//取消房源
export function cancelRecommend(id) {
  return request({
    url: 'house/room/cancelRecommend/'+id+"/"+2,
    method: 'post'
  })
}

// 查询【请填写功能名称】列表
export function listInfo(query) {

  return request({
    url: '/house/room/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getInfo(id) {
  return request({
    url: '/house/room/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addInfo(data) {
  return request({
    url: '/house/room',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateInfo(data) {
  return request({
    url: '/house/room',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delInfo(id) {
  return request({
    url: '/house/room/' + id,
    method: 'delete'
  })
}
